// MX710Lights.h: interface for the CMX710Lights class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MX710LIGHTS_H__3BDF85F1_1924_4EE5_817C_8FF37389B46A__INCLUDED_)
#define AFX_MX710LIGHTS_H__3BDF85F1_1924_4EE5_817C_8FF37389B46A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


extern "C" {

// This file is in the Windows DDK available from Microsoft.
#include "hid\hidsdi.h"

#include <setupapi.h>
#include <dbt.h>
}



#define MX610_VID 0x046D
#define MX610_PID 0xC518

#define MX610_IRBL	7 //  InputReportByteLength
#define MX610_ORBL	7 //  OutputReportByteLength




#define MX610_MAIL_OFF				0
#define MX610_MAIL_ON				1
#define MX610_MAIL_PULSE			2
#define MX610_MAIL_FLASH			3
#define MX610_MAIL_INSTANTON		4
#define MX610_MAIL_INSTANTOFF		5

#define MX610_MESSENGER_OFF			6
#define MX610_MESSENGER_ON			7
#define MX610_MESSENGER_PULSE		8
#define MX610_MESSENGER_FLASH		9
#define MX610_MESSENGER_INSTANTON	10
#define MX610_MESSENGER_INSTANTOFF	11

#define MX610_LIGHTMAX				11




class CMX610Lights  
{
public:
	void TurnOffLedsOnExit(bool isTurnOff);

	bool Control(int type);
	void Close();
	bool Open();
	CMX610Lights();
	virtual ~CMX610Lights();

protected:
	bool m_IsTurnOffLedsOnExit;
	void Clear();
	void GetDeviceCapabilities();
	bool FindTheHID();
	bool WriteOutputReport();
	




	GUID								m_HidGuid;
	HANDLE								m_hDevInfo;
	bool								m_MyDeviceDetected; 
	PSP_DEVICE_INTERFACE_DETAIL_DATA	m_detailData;
	HANDLE								m_DeviceHandle;
	HIDP_CAPS							m_Capabilities;
	HANDLE								m_WriteHandle;
	unsigned char	    				m_OutputReport[MX610_ORBL];
	ULONG								m_Length;
	ULONG								m_Required;


};

#endif // !defined(AFX_MX710LIGHTS_H__3BDF85F1_1924_4EE5_817C_8FF37389B46A__INCLUDED_)
